package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the OTRO_IMAGE database table.
 * 
 */
@Entity
@Table(name="OTRO_IMAGE")
public class OtroImage implements Serializable {
	private static final long serialVersionUID = 1L;
	private long refnumPart;
	private String agntSync;
	private BigDecimal idImgOtro;
	private BigDecimal numpag;
	private Date tsUltSync;
	private Partida partida;

    public OtroImage() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="REFNUM_PART", unique=true, nullable=false)
	public long getRefnumPart() {
		return this.refnumPart;
	}

	public void setRefnumPart(long refnumPart) {
		this.refnumPart = refnumPart;
	}


	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="ID_IMG_OTRO")
	public BigDecimal getIdImgOtro() {
		return this.idImgOtro;
	}

	public void setIdImgOtro(BigDecimal idImgOtro) {
		this.idImgOtro = idImgOtro;
	}


	@Column(precision=3)
	public BigDecimal getNumpag() {
		return this.numpag;
	}

	public void setNumpag(BigDecimal numpag) {
		this.numpag = numpag;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional one-to-one association to Partida
	@OneToOne
	@JoinColumn(name="REFNUM_PART", nullable=false, insertable=false, updatable=false)
	public Partida getPartida() {
		return this.partida;
	}

	public void setPartida(Partida partida) {
		this.partida = partida;
	}
	
}